package edu.dlnu.newbootdemo.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.stereotype.Repository;

import java.sql.Date; // sql识别的时间
// import java.DBUtils.Date

@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@Repository
public class Student {
    // 属性
    private int sno;
    private String sname;
    private double score;
    private String stel;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date sdate;
    private int cno;
    @JsonIgnore
    private int gjob;

    public Student(int sno, String sname, double score) {
        this.sno = sno;
        this.sname = sname;
        this.score = score;
    }

    public Student(int sno, String sname, double score, String stel) {
        this.sno = sno;
        this.sname = sname;
        this.score = score;
        this.stel = stel;
    }
}
